<?php if ($this->dir): ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- layouts require "Standards Mode" rendering, which the 401-strict doctype triggers -->
<html>
<head>
	<title><?php echo utf8_encode($this->dir->getFileName()) ?></title>
	<link rel="stylesheet" type="text/css" href="/style/yui/reset.css" />
	<link rel="stylesheet" type="text/css" href="/style/yui/fonts.css" />
	<link rel="stylesheet" type="text/css" href="/style/yui/grids.css" />
	<link rel="stylesheet" type="text/css" href="/style/screen.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>

<body id="yahoo-com">
<div id="doc3" class="yui-t5">
	<div id="hd">
		<h1><?php echo utf8_encode($this->dir->getFileName()) ?></h1>
	</div>
	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
				<div class="ListContainer">
					<ul class="List Files">
						<?php foreach ($this->dir->getFiles() as $child): ?>
							<?php echo $this->objectView($child,'thumb',array('root'=>$this->root)); ?>
						<?php endforeach; ?>
					</ul>
				</div>
			</div>
		</div>
		<div class="yui-b">
			<div class="addForm">
				<form method="post" enctype="multipart/form-data" action="/file/upload<?php echo $this->urlPath($this->dir->getRelativePathFrom($this->root));?>">
					<fieldset>
						<legend>Ajouter un fichier</legend>
						<input type="file" name="file" class="file" size="8"/>
						<input type="submit" value="OK" class="submit"/>
					</fieldset>
				</form>
				<form method="post" action="/file/createfolder<?php echo $this->urlPath($this->dir->getRelativePathFrom($this->root));?>">
					<fieldset>
						<legend>Créer un dossier</legend>
						<input type="text" name="dirname" class="text"/>
						<input type="submit" value="créer" class="submit"/>
					</fieldset>
				</form>
			</div>
			<div class="folderList">
				<h2>Dossiers</h2>
				<?php if (!$this->isRoot): ?>
					<a href="../"><img src="/images/icons/folder_out.png"/> Dossier parent</a><br/>
				<?php endif; ?>
				<?php foreach ($this->dir->getDirectories() as $child): ?>
					<?php echo $this->objectView($child,'linkedtext'); ?><br/>
				<?php endforeach; ?>
			</div>
		</div>
	</div>
	<div id="ft">
	</div>
</div>
</body>
</html>
<?php endif; ?>